#include <iostream>

using namespace std;

int main(int argc, char const *argv[])
{
    int hoursWorked;
    double rate, grossPay;
    
    cout << "Enter hours worked: ";
    cin >> hoursWorked;
    cout << "Enter rate: ";
    cin >> rate;

    if (hoursWorked <= 40)
    {
        grossPay = hoursWorked * rate;
    }
    else
    {
        grossPay = (40 * rate) + ((hoursWorked - 40) * (rate * 1.5));
    }

    cout << "Your gross pay is: " << grossPay << endl;


    return 0;
}
